import pod5
import pysam
import numpy as np



pod5_dr=pod5.DatasetReader('/public/home/hpc234701005/data/R9.4/HG002/pod5/output.pod5', recursive=True)

example_result='/public/home/hpc234701005/data/R9.4/HG002/bam/dorado/example_data_signal.tsv'

outputfh = open(example_result, "w", buffering=512)

read_name='4d74fbcb-6c58-4bc5-9918-27ebd8820699'

pod5_record=pod5_dr.get_read(read_name)
signal=pod5_record.signal

for i in signal:
    s=str(i)+','
    outputfh.write(
                    f"{s}"
                    )